<?php 
\houdunwang\db\Db::execute("DROP TABLE IF EXISTS weixincms_admin");
\houdunwang\db\Db::execute("CREATE TABLE `weixincms_admin` (
  `admin_id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_username` varchar(50) NOT NULL,
  `admin_password` varchar(55) NOT NULL,
  PRIMARY KEY (`admin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8");
\houdunwang\db\Db::execute("DROP TABLE IF EXISTS weixincms_article");
\houdunwang\db\Db::execute("CREATE TABLE `weixincms_article` (
  `arc_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `created_at` datetime NOT NULL COMMENT '创建时间',
  `updated_at` datetime NOT NULL COMMENT '更新时间',
  `arc_title` varchar(100) NOT NULL DEFAULT '' COMMENT '文章标题',
  `arc_click` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '点击次数',
  `arc_content` text NOT NULL COMMENT '文章内容',
  `arc_description` varchar(100) NOT NULL DEFAULT '' COMMENT '文章描述',
  `arc_author` varchar(50) NOT NULL DEFAULT '' COMMENT '文章作者',
  `arc_linkurl` varchar(40) NOT NULL DEFAULT '' COMMENT '文章外部链接',
  `arc_source` varchar(40) NOT NULL DEFAULT '' COMMENT '文章来源',
  `arc_ishot` varchar(25) NOT NULL DEFAULT '' COMMENT '是否热门',
  `arc_iscommed` varchar(25) NOT NULL DEFAULT '' COMMENT '是否推荐',
  `cate_cid` int(3) unsigned NOT NULL DEFAULT '0' COMMENT '栏目主键',
  `arc_keyword` varchar(200) NOT NULL DEFAULT '' COMMENT '微信关键词',
  `arc_thumb` varchar(255) DEFAULT NULL COMMENT '缩略图',
  `arc_orderby` int(11) DEFAULT NULL COMMENT '文章排序',
  PRIMARY KEY (`arc_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8");
\houdunwang\db\Db::execute("DROP TABLE IF EXISTS weixincms_attachment");
\houdunwang\db\Db::execute("CREATE TABLE `weixincms_attachment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` int(11) NOT NULL COMMENT '会员编号',
  `name` varchar(80) NOT NULL,
  `filename` varchar(300) NOT NULL COMMENT '文件名',
  `path` varchar(300) NOT NULL COMMENT '文件路径',
  `extension` varchar(10) NOT NULL DEFAULT '' COMMENT '文件类型',
  `createtime` int(10) NOT NULL COMMENT '上传时间',
  `size` mediumint(9) NOT NULL COMMENT '文件大小',
  `data` varchar(100) NOT NULL DEFAULT '' COMMENT '辅助信息',
  `status` tinyint(1) unsigned NOT NULL COMMENT '状态',
  `content` text NOT NULL COMMENT '扩展数据内容',
  PRIMARY KEY (`id`),
  KEY `data` (`data`),
  KEY `extension` (`extension`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='附件'");
\houdunwang\db\Db::execute("DROP TABLE IF EXISTS weixincms_base");
\houdunwang\db\Db::execute("CREATE TABLE `weixincms_base` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_at` datetime NOT NULL COMMENT '创建时间',
  `updated_at` datetime NOT NULL COMMENT '更新时间',
  `base` text NOT NULL COMMENT '微信基本回复语',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8");
\houdunwang\db\Db::execute("DROP TABLE IF EXISTS weixincms_base_content");
\houdunwang\db\Db::execute("CREATE TABLE `weixincms_base_content` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_at` datetime NOT NULL COMMENT '创建时间',
  `updated_at` datetime NOT NULL COMMENT '更新时间',
  `content` varchar(255) NOT NULL DEFAULT '' COMMENT '回复内容',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8");
\houdunwang\db\Db::execute("DROP TABLE IF EXISTS weixincms_button");
\houdunwang\db\Db::execute("CREATE TABLE `weixincms_button` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_at` datetime NOT NULL COMMENT '创建时间',
  `updated_at` datetime NOT NULL COMMENT '更新时间',
  `title` varchar(255) NOT NULL DEFAULT '' COMMENT '菜单名称',
  `content` text NOT NULL COMMENT '菜单内容',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8");
\houdunwang\db\Db::execute("DROP TABLE IF EXISTS weixincms_category");
\houdunwang\db\Db::execute("CREATE TABLE `weixincms_category` (
  `cate_id` int(11) NOT NULL AUTO_INCREMENT,
  `created_at` datetime NOT NULL COMMENT '创建时间',
  `updated_at` datetime NOT NULL COMMENT '更新时间',
  `cate_name` varchar(100) NOT NULL DEFAULT '' COMMENT '栏目名称',
  `cate_description` varchar(200) NOT NULL DEFAULT '' COMMENT '栏目描述',
  `cate_sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '栏目排序',
  `cate_linkurl` varchar(255) NOT NULL DEFAULT '' COMMENT '外部链接url',
  `cate_pid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '栏目父级id',
  PRIMARY KEY (`cate_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8");
\houdunwang\db\Db::execute("DROP TABLE IF EXISTS weixincms_config");
\houdunwang\db\Db::execute("CREATE TABLE `weixincms_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_at` datetime NOT NULL COMMENT '创建时间',
  `updated_at` datetime NOT NULL COMMENT '更新时间',
  `system` text NOT NULL COMMENT '系统配置项',
  `weixin` text NOT NULL,
  `wechat_system_response` varchar(255) NOT NULL DEFAULT '' COMMENT '微信系统回复',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8");
\houdunwang\db\Db::execute("DROP TABLE IF EXISTS weixincms_keywords");
\houdunwang\db\Db::execute("CREATE TABLE `weixincms_keywords` (
  `kid` int(11) NOT NULL AUTO_INCREMENT,
  `created_at` datetime NOT NULL COMMENT '创建时间',
  `updated_at` datetime NOT NULL COMMENT '更新时间',
  `keywords` varchar(255) NOT NULL DEFAULT '' COMMENT '触发关键词',
  `module_id` int(11) NOT NULL DEFAULT '0' COMMENT '对应模块id',
  `module` varchar(255) NOT NULL DEFAULT '' COMMENT '关键词处理那个模块',
  PRIMARY KEY (`kid`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8");
\houdunwang\db\Db::execute("DROP TABLE IF EXISTS weixincms_migrations");
\houdunwang\db\Db::execute("CREATE TABLE `weixincms_migrations` (
  `migration` varchar(255) NOT NULL,
  `batch` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8");
\houdunwang\db\Db::execute("DROP TABLE IF EXISTS weixincms_module");
\houdunwang\db\Db::execute("CREATE TABLE `weixincms_module` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_at` datetime NOT NULL COMMENT '创建时间',
  `updated_at` datetime NOT NULL COMMENT '更新时间',
  `module_title` varchar(100) NOT NULL DEFAULT '' COMMENT '模块中文名称',
  `module_name` varchar(100) NOT NULL DEFAULT '' COMMENT '模块英文标识',
  `module_author` varchar(100) NOT NULL DEFAULT '' COMMENT '模块作者',
  `module_introduction` varchar(200) NOT NULL DEFAULT '' COMMENT '模块介绍',
  `module_thumb` varchar(200) NOT NULL DEFAULT '' COMMENT '模块缩略图',
  `module_is_wechat` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否处理微信消息，1代表处理，0代表不处理',
  `module_is_system` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否为系统模块，1代表是，0代表不是',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8");
\houdunwang\db\Db::execute("DROP TABLE IF EXISTS weixincms_seeds");
\houdunwang\db\Db::execute("CREATE TABLE `weixincms_seeds` (
  `seed` varchar(255) NOT NULL,
  `batch` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8");
\houdunwang\db\Db::execute("DROP TABLE IF EXISTS weixincms_slide");
\houdunwang\db\Db::execute("CREATE TABLE `weixincms_slide` (
  `slide_id` int(11) NOT NULL AUTO_INCREMENT,
  `created_at` datetime NOT NULL COMMENT '创建时间',
  `updated_at` datetime NOT NULL COMMENT '更新时间',
  `slide_title` varchar(255) NOT NULL DEFAULT '' COMMENT '幻灯片标题',
  `slide_linkurl` varchar(255) NOT NULL DEFAULT '' COMMENT '幻灯片跳转连接',
  `slide_orderby` tinyint(4) NOT NULL DEFAULT '0' COMMENT '幻灯片排序',
  `slide_thumb` varchar(255) NOT NULL DEFAULT '' COMMENT '幻灯缩略图',
  PRIMARY KEY (`slide_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8");
